<template>
  <div class="content">
    <el-dialog v-model="dialog" title="转移给他人" width="740">
      <div class="dialog">
        <div class="user_box">
          <div
            v-for="(item, index) in 6"
            :key="index"
            :class="['user', activeUser == index && 'active']"
            @click="change(index)"
          >
            张大卫组员
          </div>
        </div>
        <div style="overflow-y: auto; width: 520px; border: 1px solid #e5e5e5">
          <el-table :data="tableData">
            <el-table-column prop="date" label="昵称" />
            <el-table-column prop="name" label="用户名" />
          </el-table>
        </div>
        <div class="select">
          <div class="top">
            <div style="color: #999999">已选择</div>
            <div>清空</div>
          </div>
          <div class="Selected_name">
            <div class="min" v-for="(item, index) in 6" :key="index">
              <div class="name">张真宁</div>
              <el-icon><Close /></el-icon>
            </div>
          </div>
        </div>
      </div>
      <template #footer>
        <div class="dialog-footer">
          <el-button type="primary" @click="dialogFollowup = false">
            确定
          </el-button>
          <el-button @click="dialogFollowup = false">取消</el-button>
        </div>
      </template>
    </el-dialog>
  </div>
</template>

<script setup>
import { ref, reactive } from "vue";
import { Close } from "@element-plus/icons-vue";
const dialog = ref(false);
const activeUser = ref(0); // 选中的用户
function change(index) {
  activeUser.value = index;
}
const tableData = [
  {
    date: "2016-05-03",
    name: "Tom"
  },
  {
    date: "2016-05-02",
    name: "Tom"
  },
  {
    date: "2016-05-04",
    name: "Tom"
  },
  {
    date: "2016-05-01",
    name: "Tom"
  },
  {
    date: "2016-05-01",
    name: "Tom"
  },
  {
    date: "2016-05-01",
    name: "Tom"
  },
  {
    date: "2016-05-01",
    name: "Tom"
  },
  {
    date: "2016-05-01",
    name: "Tom"
  }
];
</script>

<style scoped lang="scss">
.dialog {
  height: 600px;
  display: flex;
  .user_box {
    background: #f7f8fa;
    height: 100%;
    width: 100px;
    border: 1px solid #e5e5e5;
    // overflow-y: scroll;
    .user {
      text-align: center;
      line-height: 45px;
      font-size: 12px;
    }
    .active {
      color: #409eff;
      position: relative;
      &::after {
        position: absolute;
        content: " ";
        width: 4px;
        height: 30px;
        background: #409eff;
        border-radius: 4px;
        left: 0;
        top: 8px;
      }
    }
  }
  .select {
    width: 250px;
    border: 1px solid #e5e5e5;
    .top {
      font-size: 13px;
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 10px;
      border-bottom: 1px solid #e5e5e5;
    }
    .Selected_name {
      padding: 10px;
      display: flex;
      flex-wrap: wrap;
      .min {
        background: #eaebee;
        display: flex;
        align-items: center;
        width: fit-content;
        margin-right: 4px;
        padding: 6px;
        border-radius: 4px;
        margin-bottom: 6px;
        .name {
          margin-right: 4px;
        }
      }
    }
  }
}
</style>
